import axios from 'axios'

const api = axios.create({
    baseURL: 'http://127.0.0.1:8080',
    timeout: 1000 * 60
})

api.interceptors.request.use(config => {
    return config
}, err => {
    Promise.reject(err)
})

api.interceptors.response.use(res => {
    console.log(res)
    return res.data
}, err => {
    Promise.reject(err)
})

export default api